#ifndef RINGPROGRESSBAR_H
#define RINGPROGRESSBAR_H

#include <QWidget>
#include <QTimer>

class RingProgressBar : public QWidget
{
    Q_OBJECT
public:
    explicit RingProgressBar(QWidget *parent = nullptr);
    void setRotateDelta(int delta);
    void setPercent(int persent);
    void newGame();
    void gameOver();

private:
    int rotate_angle;//旋转角度
    int percent; //百分比
    static const int ROUND_TIME = 10;
    QTimer *timer;
protected:
    void paintEvent(QPaintEvent *);

public slots:
    void slotPlayerChanged(bool);
signals:
    void signalTimeOut();

};

#endif // RINGPROGRESSBAR_H
